package ru.rchervot.sanasar.server;

import java.util.ArrayList;

import ru.rchervot.sanasar.client.model.AbstractSearchResultsItem;
import ru.rchervot.sanasar.client.model.ItemObject;
import ru.rchervot.sanasar.client.model.Query;
import ru.rchervot.sanasar.client.model.ResultsPage;

public interface SearchServiceServerInternal {
	public Query getQuery(int queryID) throws Exception;
	public ArrayList<Integer> getQueryResult(int queryID) throws Exception;
	
	public Query loadQueryFromDB(int queryID) throws Exception; 
	public Integer saveQueryToDB(Query q) throws Exception; 
	
	public ArrayList<Integer> processQuery(Query q) throws Exception;
	
	public ResultsPage getPage(int queryID) throws Exception;
	public ArrayList loadItems(ArrayList<Integer> itemsIDs, Integer userId) throws Exception;
	public AbstractSearchResultsItem loadItem(int queryID, int userId) throws Exception;
	public ItemObject loadItemObject(int queryID, int itemPosition) throws Exception;
}
